<?php
/**
 * CRMLite Staff Controller
 *
 * @final
 * @package Crmlite_Module_Default
 * @version $Id: StaffController.php 36 2007-09-01 02:34:38Z etng2004 $
 * @copyright 2006-2007 ETE.CN
 * @author Yi BO  <etng2004@gmail.com>
 * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt}
 */
require_once dirname(__FILE__) . '/BaseController.php';
final class StaffController extends BaseController
{
    public function indexAction()
    {
    	$this->log('Index page called!');
		$this->_forward('list');
    }
    public function listAction()
    {
    	$pager = array(
    					'curpage' 	=> $this->_getParam('page', 1),
    					'perpage'	=> 10,
    					'total'		=> 1231,
    					'url'		=> '/staff/list/',
    					);
		$SM = new StaffModel();
		$this->view->staffs = $SM->paginate(null, null, $pager['curpage'], $pager['perpage'] );
		$this->path['points'][] = array('title'=>'员工管理', 'link'=>'');
		$this->path['node'] = array('title'=>'员工列表', 'count'=>$pager['total']);
		$this->view->pager = $pager;
		$this->view->page = $this->page;
		$this->view->path = $this->path;
    }

    public function loginAction()
    {
    	if($this->isPost())
    	{


    	}

    }

    public function logoutAction()
    {

    }
}
